<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="favicon.ico" />
<link href="user/css/UserCenter.css?v=<?=WEB_VERSION?>" rel="stylesheet" type="text/css" />
<script src="user/js/jquery-1.7.1.min.js?v=<?=WEB_VERSION?>" type="text/javascript" language="javascript"></script>
<script type="text/javascript">
$(document).ready(function(){$('.BangZhux1 a').click(function(){$(this).attr('style',' font-weight:bold; color:#3D95C9;');$(this).next().slideToggle("fast");});});
</script>
<title>100课堂英语学习会员中心</title>
</head>
<body>
<div style="width:500px; min-height:220px; height:auto; margin:0 auto; background:#F0F4F7; border:1px solid #C1D1E1; border-bottom:0;">
    <div style="width:466px; height:auto; position:relative;">
        <form action="user_subMessage.htm" method="post" name="YSKEI">
        <ul style="padding-top:30px;padding-left:30px;width:350px;">
        <li class="Fl">手机号：</li><input type="text" name="phone" value="<?=getParamValue('phone')?>" id="phone"  style="width:160px; height:24px; border:1px solid #ccc; line-height:24px;"/><span>*</span></ul>
        <div class="clearc"></div>
        <ul  style="padding-top:10px;padding-left:30px;">
        <li class="Fl">验证码：</li>
	        	<input type="text" name="code" id="code"  size="5" style="width:60px; height:24px; border:1px solid #ccc; line-height:24px;"/><span>*</span>
        </ul>
        <p style="padding-top:10px;padding-left:30px; width:400px;">友情提示:
        <br>
        <span>1>短信会及时发送，请耐心等待1-2分钟(<font color="red">倒计时期间不可重复发送短信</font>),若没有收到，请电话 400-632-5656与我们联系！</span><br>
        <span>2>由于手机拦截软件可能会误将系统短信当做垃圾短信进行拦截，请设置短信白名单处理，或者在垃圾短信中找寻。</span>
        </p>
        <div class="YCU3" style="margin-left:30px;">
        	<input type="button" value="点击获取验证码" id="sms_code" style="background:#A5C94B; margin-right:2px; padding:3px 10px; color:#fff;">
        	<input type="button" value="验证" id="sms_verify"  style="background:#A5C94B; margin-right:2px; padding:3px 10px; color:#fff;">
        </div>
        </form>
    </div>
    </div>
    <div class="clearc"></div>
</div>
<script type="text/javascript" src="user/js/user_info.min.js?v=<?=WEB_VERSION?>"></script>
<script>
window.returnValue="";
var sms_verify =new Object();
$("#sms_verify").click(function(){
	var code = $("#code").val();
	var phone = $("#phone").val();
	if(phone==""){
		alert('请填写手机号');
		return;
	}
	if(!phone.match(/^1[3|4|5|8][0-9]\d{4,8}$/)||phone.length!=11){
		alert('手机格式不正确,请重新输入');
		return;
	}	
	if(code==""){
		alert('请填写验证码');
		return;
	}
	$.ajax({
		 url:"user_subverifyCode.htm",
		 data:"code="+code+"&phone="+phone,
		 dataType: 'json',
		 async:false,
		 success:sms_verify.response
	});
})

sms_verify.response = function(res){
	if(res.success==true){
		window.returnValue = $("#phone").val();
		alert('验证成功,祝你学习成功');
		window.close();
	}else{
		if(res.success=='fail_duplicate'){
			alert('该手机号已被他人使用,请更换手机号码');
		}
		if(res.code==20){
			alert('验证码错误');
		}
		if(res.code==21){
			alert('验证手机和接收验证码手机非同一手机');
		}
	}
}
</script>
</body>
</html>
